home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
CrossDOS_Plus.adf
/
Install
< prev
next >
Wrap
Text File
|
1992-09-07
|
30KB
|
1,383 lines
;********************************************************************
;Installation script for CrossDOS 5+ (including CrossPC)
;********************************************************************
;Version 5.04
;August 28, 1992
;Important: Before shipping, replace all references to ":" with ":".
;Bugs in Installer V1.22:
;1. The "run" command does not accept a relative path.
;2. The tooltype delete feature is case-sensitive.
;3. May get "not a dos disk" requesters at start-up.
;mycopylib is used because of installer limitations. It uses the following global
;strings as input:
;mysource - source
;mydest - destination
;mynewname - new name
(procedure mycopylib
(
(set errorflag 0)
;form destination file
(set destfile
(tackon mydest mynewname)
)
(if
(= 0
(exists destfile)
)
(
(copyfiles
(source mysource)
(dest mydest)
(newname mynewname)
)
(set errorflag 1)
)
(
;the destfile exists, so we must check the versions
(if
(exists mysource)
(
(set sourcevernum (getversion mysource))
(set sourcever (/ sourcevernum 65536))
(set sourcerev (- sourcevernum (* sourcever 65536)))
(set destvernum (getversion destfile))
(set destver (/ destvernum 65536))
(set destrev (- destvernum (* destver 65536)))
(if
(or
(or
(not ks20)
(> sourcever destver)
)
(
(and
(= sourcever destver)
(>= sourcerev destrev)
)
)
)
(
(copyfiles
(source mysource)
(dest mydest)
(newname mynewname)
)
(set errorflag 1)
)
)
)
)
)
)
(if
(= errorflag 0)
(
;Handle a version conflict
(if
(= @user-level 2)
(
(if
(askbool
(prompt (cat "The version of \"" mynewname)
"\" currently on your system appears to be "
"newer than the CrossDOS version."
)
(choices "Overwrite"
"Skip"
)
(help "This message should only appear if you are "
"running Workbench 2.1 or later. If you are not, "
"select Overwrite to copy the CrossDOS file anyway."
)
)
(
(copyfiles
(source mysource)
(dest mydest)
(newname mynewname)
)
(set errorflag 1)
)
)
)
)
)
)
)
)
(procedure InstallTDPatch
(
;Install TDPatch12/TDPatch13
(if
(< osver 35)
(
(if
(= osver 33)
(
(set patch "TDPatch12 >nil:")
(copyfiles
(source ":c/TDPatch12")
(dest "c:")
(newname "TDPatch12")
)
)
(
(set patch "TDPatch13 >nil:")
(copyfiles
(source ":c/TDPatch13")
(dest "c:")
(newname "TDPatch13")
)
)
)
(if
(= @user-level 2)
(message "You are running Kickstart 1.2 or 1.3. "
"A special patch utility called TDPatch12/"
"TDPatch13 is REQUIRED for CrossDOS/CrossPC to function "
"on your system. This file was copied to "
"your C: directory."
)
)
)
)
)
)
;SetHD -- place hard drive information (e.g. C=PCC) in the CrossPC tooltypes
;harddisk -- e.g. PCC
;pcdir -- directory of CrossPC icon
(procedure SetHD
(
;If the user has configured a hard drive during this session,
;add an appropriate tooltype.
(if
(not
(= harddisk "")
)
(
;Grab the last character of harddisk and place it in hdchar
(set hdchar
(substr harddisk
(-
(strlen harddisk)
1
)
1
)
)
(if
(not
(exists
(tackon pcdir "CrossPC.info")
)
)
(message "Warning: Can't find CrossPC's icon. CrossPC will not be configured.")
)
(tooltype
(dest (tackon pcdir "CrossPC"))
(noposition)
(settooltype hdchar harddisk)
)
)
)
)
)
;MountHD -- mount the thing and place junk into s:user-startup
;harddisk -- e.g. PCC
(procedure MountHD
(
;If the user has configured a hard drive during this session,
;mount etc.
(if
(not
(= harddisk "")
)
(
;Mount the hard drive the user just configured.
(run
(cat @execute-dir
(cat "c/mount >nil: devs:DOSDrivers/" harddisk)
)
)
;Install into s:user-startup
(startup
(cat "CrossDOSV5+ - mounting hard drive "
(cat harddisk ":")
)
(prompt "About to add a command in s:user-startup to automatically "
"mount the hard drive you configured..."
)
(help "If you elect not to add the mount command to your user-startup, "
"you may mount the drive simply by clicking on its icon."
)
(command
(cat prefix
(cat "Mount >nil: DEVS:DOSDrivers/" harddisk)
)
)
)
)
)
)
)
;********************** CrossDOS installation **************************
(procedure InstallCrossDOS
(
(message "About to install CrossDOS...")
;Delete an old installation of CrossDOS
(if
(exists "l:msdosfilesystem")
(set old 1) ;if old
(set old 0) ;if not old
)
(if old
(
(message "About to delete a previous CrossDOS installation...")
;sys:system
(delete "sys:system/diskchg")
(delete "sys:system/diskchk")
(delete "sys:system/IntlTrans")
(delete "sys:system/kill")
(delete "sys:system/mdiskcopy")
(delete "sys:system/mformat")
(delete "sys:system/txfilter")
(delete "sys:system/diskchg.info")
(delete "sys:system/diskchk.info")
(delete "sys:system/IntlTrans.info")
(delete "sys:system/kill.info")
(delete "sys:system/mdiskcopy.info")
(delete "sys:system/mformat.info")
(delete "sys:system/txfilter.info")
(delete "sys:system/Atari_S9.MFormat.info")
(delete "sys:system/Atari_D9.MFormat.info")
(delete "sys:system/MSDOS_D9.MFormat.info")
(delete "sys:system/MSDOS_S9.MFormat.info")
(delete "sys:system/MSDOS_QD9.MFormat.info")
(delete "sys:system/MSDOS_Q18.MFormat.info")
(delete "sys:system/DiskChg.di0.info")
(delete "sys:system/DiskChg.di1.info")
(delete "sys:system/DiskChg.di2.info")
(delete "sys:system/DiskChg.di3.info")
(delete "sys:system/Kill.di0.info")
(delete "sys:system/Kill.di1.info")
(delete "sys:system/Kill.di2.info")
(delete "sys:system/Kill.di3.info")
(delete "sys:system/TxFilter.di0.info")
(delete "sys:system/TxFilter.di1.info")
(delete "sys:system/TxFilter.di2.info")
(delete "sys:system/TxFilter.di3.info")
;sys:crossdos
(delete "sys:crossdos/diskchg")
(delete "sys:crossdos/diskchk")
(delete "sys:crossdos/IntlTrans")
(delete "sys:crossdos/kill")
(delete "sys:crossdos/mdiskcopy")
(delete "sys:crossdos/mformat")
(delete "sys:crossdos/txfilter")
(delete "sys:crossdos/diskchg.info")
(delete "sys:crossdos/diskchk.info")
(delete "sys:crossdos/IntlTrans.info")
(delete "sys:crossdos/kill.info")
(delete "sys:crossdos/mdiskcopy.info")
(delete "sys:crossdos/mformat.info")
(delete "sys:crossdos/txfilter.info")
(delete "sys:crossdos/Atari_S9.MFormat.info")
(delete "sys:crossdos/Atari_D9.MFormat.info")
(delete "sys:crossdos/MSDOS_D9.MFormat.info")
(delete "sys:crossdos/MSDOS_S9.MFormat.info")
(delete "sys:crossdos/MSDOS_QD9.MFormat.info")
(delete "sys:crossdos/MSDOS_Q18.MFormat.info")
(delete "sys:crossdos/DiskChg.di0.info")
(delete "sys:crossdos/DiskChg.di1.info")
(delete "sys:crossdos/DiskChg.di2.info")
(delete "sys:crossdos/DiskChg.di3.info")
(delete "sys:crossdos/Kill.di0.info")
(delete "sys:crossdos/Kill.di1.info")
(delete "sys:crossdos/Kill.di2.info")
(delete "sys:crossdos/Kill.di3.info")
(delete "sys:crossdos/TxFilter.di0.info")
(delete "sys:crossdos/TxFilter.di1.info")
(delete "sys:crossdos/TxFilter.di2.info")
(delete "sys:crossdos/TxFilter.di3.info")
(delete "sys:crossdos/.info")
(delete "sys:crossdos")
(if
(not
(exists "sys:crossdos")
)
(delete "sys:crossdos.info")
)
;***** End of deleting *****
;Replace old MountMF command
(if
(exists "sys:mountmf")
(copyfiles
(source ":c/MountMF")
(dest "sys:")
(newname "MountMF")
)
)
(if
(exists "sys:crossdos/mountmf")
(copyfiles
(source ":c/MountMF")
(dest "sys:CrossDOS")
(newname "MountMF")
)
)
(if
(exists "c:mountmf")
(copyfiles
(source ":c/MountMF")
(dest "c:")
(newname "MountMF")
)
)
(if
(exists "sys:wbstartup/mountmf")
(copyfiles
(source ":c/MountMF")
(dest "sys:wbstartup")
(newname "MountMF")
)
)
)
)
;Create certain directories if they don't exist
(makedir "l:FileSystem_Trans"
(infos)
)
(makedir "sys:system"
(infos)
)
;The purpose of this is to create an icon for the devs: directory
;if needed.
(makedir
(getassign "devs")
(infos)
)
(makedir "devs:DOSDrivers"
(infos)
)
(if ks20
(set postfix ".2")
(set postfix "")
)
;Put up menu asking about diskcopy/format/mount
(set utilopt 0)
(if @user-level
(set utilopt
(askchoice
(prompt "CrossDOS is supplied with greatly enhanced DiskCopy, Format "
"and Mount commands. We recommend replacing the existing commands "
"to allow greater functionality. "
"Please select an "
"option:"
)
(choices "Replace existing commands"
"Rename to CDDiskCopy, CDFormat, CDMount"
)
(help "Most users will want to replace their old commands with "
"the enhanced commands, because the old commands offer "
"no advantage. If you are fond of the old commands you may "
"choose to install the commands with a different name, starting with "
"CD (Cross Dos). Note that the replace option will NOT "
"overwrite your commands if you have a newer version "
"than we supply."
)
)
)
)
(if
(= utilopt 0)
(set prefix "")
)
(if
(= utilopt 1)
(set prefix "CD")
)
(InstallTDPatch)
;Install mfm.device
(copyfiles
(source ":devs/mfm.device")
(dest "devs:")
(newname "mfm.device")
)
;Install Mount command
(set mysource (cat ":c/Mount" postfix))
(set mydest "c:")
(set mynewname (cat prefix "Mount"))
(mycopylib)
;Install CrossDOSFileSystem
(copyfiles
(source (cat ":l/CrossDOSFileSystem" postfix))
(dest "l:")
(newname "CrossDOSFileSystem")
)
(if old
(copyfiles
(source (cat ":l/CrossDOSFileSystem" postfix))
(dest "l:")
(newname "MSDOSFileSystem")
)
)
;Copy devs:dosdrivers
(foreach ":" "PC?"
(
(copyfiles
(source
(cat ":" @each-name)
)
(dest "devs:DOSDrivers")
(newname @each-name)
)
(copyfiles
(source
(cat ":"
(cat @each-name ".info")
)
)
(dest "devs:DOSDrivers")
(newname
(cat @each-name ".info")
)
)
(tooltype
(dest
(cat "devs:DOSDrivers/" @each-name)
)
(noposition)
(setdefaulttool
(cat
(cat "c:" prefix)
("Mount")
)
)
;Delete the "filesystem=" entry
;Case-sensitive!!! (yet another installer bug)
(settooltype "FILESYSTEM")
)
)
)
;Install gadtools13.library if running under 1.3.
(if
(not ks20)
(
(copyfiles
(source ":libs/gadtools13.library")
(dest "libs:")
(newname "gadtools13.library")
)
)
)
;Ask the user whether he has a floptical
(set floptical
(askbool
(prompt "Do you have a Floptical drive?")
(help "If you aren't sure whether you have a Floptical, "
"you don't have one."
)
)
)
;Install Format
(if floptical
(
(copyfiles
(source ":system/Format")
(dest "sys:system")
(newname (cat prefix "Format"))
)
)
(
(set mysource (cat ":system/Format" postfix))
(set mydest "sys:system")
(set mynewname (cat prefix "Format"))
(mycopylib)
)
)
(if errorflag
(
(copyfiles
(source ":system/Format.info")
(dest "sys:system")
(newname (cat prefix "Format.info"))
)
(tooltype
(dest "sys:system/Format")
(noposition)
)
)
)
;Install alternate format icons (if floptical user)
(if floptical
(
(makedir "sys:system/Alt_Formats"
(infos)
)
(foreach ":system/Alt_Formats" "#?.Format.info"
(
(copyfiles
(source
(cat ":system/Alt_Formats/" @each-name)
)
(dest "sys:system/Alt_Formats")
(newname @each-name)
)
;Create a version of @each-name without the .info
(set infoname
(substr @each-name 0
(-
(strlen @each-name)
5
)
)
)
(tooltype
(dest
(cat "sys:system/Alt_Formats/" infoname)
)
(noposition)
(setdefaulttool
(cat
(cat "sys:system/" prefix)
("Format")
)
)
)
)
)
)
)
;Install DiskCopy
(set mysource (cat ":system/DiskCopy" postfix))
(set mydest "sys:system")
(set mynewname (cat prefix "DiskCopy"))
(mycopylib)
(if errorflag
(
(copyfiles
(source ":system/DiskCopy.info")
(dest "sys:system")
(newname (cat prefix "DiskCopy.info"))
)
(tooltype
(dest "sys:system/DiskCopy")
(noposition)
)
)
)
;Install the CrossDOS utility
;Copy FileSystem_Trans
(copyfiles
(source ":l/FileSystem_Trans")
(dest "l:FileSystem_Trans")
(all)
)
(copyfiles
(source (cat ":system/CrossDOS" postfix))
(dest "sys:system")
(newname "CrossDOS")
)
(copyfiles
(source ":system/CrossDOS.info")
(dest "sys:system")
(newname "CrossDOS.info")
)
(tooltype
(dest "sys:system/CrossDOS")
(noposition)
)
;Last copy operation -- copy DiskChg to sys:system
(copyfiles
(source ":system/DiskChg")
(dest "sys:system")
(infos) ;required!!!
(newname "DiskChg")
)
(tooltype
(dest "sys:system/DiskChg")
(noposition)
)
;Enter mount command in s:user-startup - ONLY if new user!!!
(if
(= old 0)
(
(startup "CrossDOSV5+ - automatically mount all devices"
(prompt "About to install a command in s:user-startup to automatically "
"start CrossDOS when you boot your system..."
)
(help "Normally you want CrossDOS to be automatically invoked every "
"time you start your system."
)
(command (cat prefix "Mount >nil: devs:DOSDrivers/~(#?.info)"))
)
)
)
;Mount the stuff now so the user can use it immediately - if new user
(if
(= old 0)
;This 'run' is safe because c: is an explicit path
(run
(cat
(cat "c:" prefix)
("Mount >nil: devs:DOSDrivers/~(#?.info)")
)
)
(message "Because you seem to have previously installed CrossDOS, "
"you may need to reboot your system for the CrossDOS V5 "
"upgrade to take effect."
)
)
(message "CrossDOS is now installed.")
)
)
;********************** CrossPC installation **************************
(procedure InstallCrossPC
(
(if
(not
(exists ":CrossPC")
)
(
(message "This copy of CrossDOS does not include CrossPC. Exiting...")
(exit
(quiet)
)
)
)
(message "About to install CrossPC...")
(if
(= 0
(exists "l:CrossDOSFileSystem")
)
(
(message "Note: CrossDOS V5 is not currently installed. It is "
"STRONGLY suggested that you install CrossDOS before "
"attempting to use CrossPC - or, if you prefer, invoke "
"CrossDOS directly from the product disk."
)
(InstallTDPatch)
(copyfiles
(source ":devs/mfm.device")
(dest "devs:")
(newname "mfm.device")
)
)
)
(set pcdir
(askdir
(prompt "Please select a drawer in which to install "
"CrossPC"
)
(help "CrossPC is not picky about where you put it. Choose "
"any drive/drawer. Use the \"Make New Drawer\" option "
"to create a new drawer, if desired."
)
(default "sys:")
)
)
(copyfiles
(source ":CrossPC")
(dest pcdir)
(infos) ;required!!!
(newname "CrossPC")
)
;Set memory size tooltype for CrossPC
(set memopt
(askchoice
(prompt "Select a default IBM memory size. (You may change it later "
"by using the Info facility of Workbench)."
)
(help "If you have a reasonable amount of Amiga memory (3MB+) we "
"recommend the 704K setting to maximize the ability "
"of CrossPC. (NOTE: CrossPC does NOT support expanded or extended "
"memory). However, if maximum compatibility is your primary "
"concern, choose the 640K setting; a few (very few!) programs "
"don't run with 704K of memory."
)
(choices "256K - recommended for 1MB systems"
"384K"
"512K"
"640K - most compatible setting"
"704K - recommended for 3MB+ systems"
)
)
)
(if
(= memopt 0)
(set memtool "256")
)
(if
(= memopt 1)
(set memtool "384")
)
(if
(= memopt 2)
(set memtool "512")
)
(if
(= memopt 3)
(set memtool "640")
)
(if
(= memopt 4)
(set memtool "704")
)
(tooltype
(dest (tackon pcdir "CrossPC"))
(noposition)
(settooltype "MEM1" memtool)
)
(MountHD)
(SetHD)
;Check whether the user has a DF1:. If so, place B=PC1 in the
;CrossPC tooltypes.
(if
(not
(= ""
(getassign "df1" "d")
)
)
(
(tooltype
(dest (tackon pcdir "CrossPC"))
(noposition)
(settooltype "B" "PC1")
)
)
)
;Check whether the user has a DF2: but no DF1:. In that case,
;modify the "b=" tooltype.
(if
(= ""
(getassign "df1" "d")
)
(
(if
(not
(= ""
(getassign "df2" "d")
)
)
(
(tooltype
(dest (tackon pcdir "CrossPC"))
(noposition)
(settooltype "B" "PC2")
)
)
)
)
)
(message "CrossPC is now installed.")
)
)
;********************** Configure Hard Disk **************************
(procedure ConfigureHardDisk
(
;Disallow pretend mode
(if @pretend
(
(message "Sorry, you can't run the hard drive configuration in "
"\"pretend\" mode. Exiting..."
)
(exit
(quiet)
)
)
)
(if
(= 0
(exists "l:CrossDOSFileSystem")
)
(
(message "CrossDOS V5 is not currently installed. It must "
"be installed before you can configure a hard drive. "
"Switching to CrossDOS installation..."
)
(InstallCrossDOS)
)
)
(set opt
(askchoice
(choices "Configure on an Amiga Partition"
"Configure a 100% MS-DOS Hard Disk"
)
(prompt "Please select an option. * Hit HELP for details!!! *")
(help "If you wish to create a simulated MS-DOS hard drive "
"on one of your Amiga hard drive partitions (note: "
"the MS-DOS information will completely wipe out any Amiga "
"files on that partition) select \"Configure on an Amiga "
"Partition\". If you want to dedicate an entire PHYSICAL "
"hard drive (or Syquest or Floptical or...) to storing "
"MS-DOS information, select \"Configure a 100% MS-DOS Hard "
"Disk\". Note that the configuration utility does not "
"support very old controllers such as the Commodore A2090. "
"In that case you must configure a MountList \"by hand\"."
)
)
)
;Ask for drive prefix
(set driveprefix
(askstring
(default "PC")
(prompt "Please enter a prefix to be assigned to the MS-DOS "
"device you wish to configure. A 'C' will be added "
"to the end of the device name for you. Please choose "
"a device name that is not already in use. "
"\nPress HELP for details."
)
(help "You must enter a prefix (which may be any normal "
"text, without spaces or any special characters) which will "
"be used to access the MS-DOS drive/partition from AmigaDOS. "
"A letter of 'C' will be "
"added by the configuration utility "
"to form the complete drive name, as accessed from AmigaDOS. "
"The relationship between the AmigaDOS drive name and the "
"MS-DOS drive name (accessed by CrossPC or by a real IBM) is very "
"simple. The last letter of the AmigaDOS name is the MS-DOS name. "
"For example, PCC: refers to MS-DOS drive C:. The prefix to "
"enter now would be PC (the default)."
)
)
)
;Create a temporary directory
(makedir "ram:CrossDOSTemp")
(set MountListDir "ram:CrossDOSTemp")
(makedir MountListDir)
;Run the ConfigDev program
(if
(= opt 0)
(set drivetype "AMIGA")
(set drivetype "MSDOS")
)
(set runargs
(cat
(drivetype)
(" -fL:CrossDOSFileSystem")
)
)
(set runargs
(cat
(runargs)
(cat
(" -t")
(MountListDir)
)
)
)
(set runargs
(cat
(runargs)
(cat
(" -p")
(driveprefix)
)
)
)
(run
(cat
(cat @execute-dir "c/ConfigDisk ")
runargs
)
)
;Create icons for the files in MountListDir and copy to DEVS:DOSDrivers
(set success 0)
(foreach MountListDir "#?"
(
(set success 1)
(set okflag 1)
;Check for "floptical" - ignore
(if
(= @each-name "floptical")
(set okflag 0)
)
;Check whether the user already has a mountfile of the same name
(if okflag
(if
(exists
(cat
("devs:DOSDrivers/")
(@each-name)
)
)
(
(set okflag
(askbool
(prompt "A file called \"" @each-name
"\" already exists in your DEVS:DOSDrivers "
"directory."
)
(choices "Overwrite"
"Cancel"
)
(help "You may elect to overwrite the mountfile "
"that currently exists, or abort the whole "
"procedure."
)
)
)
)
)
)
(if okflag
(
(copyfiles
(source
(cat
(cat
(MountListDir)
("/")
)
(@each-name)
)
)
(dest "devs:DOSDrivers")
(infos) ;just in case the DOSDrivers directory needs to be created.
(newname @each-name)
)
(copyfiles
(source ":PC0.info")
(dest "devs:DOSDrivers")
(newname (cat @each-name ".info"))
)
;Determine what default tool to use (c:Mount or
;c:CDMount).
;Check to see whether the user has a c:CDMount. If so, set "prefix"
;to "CD".
(if
(exists "c:CDMount")
(set prefix "CD")
)
(tooltype
(dest
(cat
("devs:DOSDrivers/")
(@each-name)
)
)
(noposition)
(setdefaulttool
(cat
(cat "c:" prefix)
("Mount")
)
)
;Delete the "filesystem=" entry
;Case-sensitive!!! (yet another installer bug)
(settooltype "FILESYSTEM")
)
(set harddisk @each-name)
)
)
)
)
;Delete the file created by ConfigDisk
(if success
(
(delete "ram:CrossDOSTemp/floptical")
(delete
(cat
("ram:CrossDOSTemp/")
(harddisk)
)
)
;Check whether the user selected "Install CrossPC". If not,
;ask whether he wants to add this drive to CrossPC's tooltypes. etc
(if
(not
(in mainopt 2)
)
(
(MountHD)
(if
(or
(= 1
(exists "sys:CrossPC")
)
(= 1
(exists "sys:CrossPC/CrossPC")
)
)
(
(if
;File?
(= 1
(exists "sys:CrossPC")
)
(
(set pcdir "sys:")
(SetHD)
)
(
(set pcdir "sys:CrossPC")
(SetHD)
)
)
)
(
;Ask the user whether he wants to set the CrossPC tooltype
(if
(askbool
(prompt "If you have already installed CrossPC *and* "
"you wish to make the hard drive you configured "
"accessible to CrossPC, select \"Yes\"."
)
(help "If you select \"yes\", the installer will ask you "
"where CrossPC has been installed. The installer "
"will proceed to add a tooltype to the CrossPC icon."
)
)
(
(set notok 1)
(while notok
(
(set pcdir
(askdir
(prompt "Select the directory in which you "
"installed CrossPC."
)
(help "The installer will proceed to add a tooltype "
"to the CrossPC icon."
)
(default "sys:")
)
)
(if
(= 1
(exists
(tackon pcdir "CrossPC")
)
)
(
(SetHD)
(set notok 0)
)
(
(message "CrossPC is not in the directory you selected.")
)
)
)
)
)
)
)
)
)
)
(if success
(message "Hard drive configuration is completed."
"\n\n############ WARNING!!! ############"
"\nDO NOT use our Format command or the Amiga format command "
"to format " harddisk ":. Instead, you must treat the "
"hard disk you just configured as an unformatted MS-DOS hard disk. "
"This means you must use the FDISK and FORMAT commands "
"provided by MS-DOS to partition and format the hard disk. "
"(Consult your MS-DOS manual about the use of these commands.) "
"Failure to heed this warning may cause unpredictable results."
)
(message "Hard drive configuration could not be completed.")
)
)
)
;Delete the temporary directory created by this script
(delete "ram:CrossDOSTemp")
)
)
;********************** Product Registration **************************
(procedure Register
(
(if
(exists ":c/Registration")
(
(run
(cat @execute-dir
(cat "c/Registration "
(cat @execute-dir "RegistrationInfo")
)
)
)
)
(message "The Product Registration utility was not completed in time "
"for shipment with CrossDOS V5+. Please fill out the "
"usual registration card and mail it in. Thank you!"
)
)
)
)
;***************************************************************************
;***************************** MAIN ****************************************
;***************************************************************************
;Force user level to 1 or 2. This is unfortuntely required because otherwise
;we can't present a menu of choices to the user.
(if
(= @user-level 0)
(
(user 1)
(set @user-level 0)
)
)
;Test whether we can access :l/CrossDOSFileSystem. If not, the user is
;not running from the product disk - abort.
(if
(not
(exists ":l/CrossDOSFileSystem")
)
(
(message "You must run the installation program from the "
"CrossDOS disk. Exiting..."
)
(exit
(quiet)
)
)
)
;Initialize certain variables
(set pcdir "")
(set harddisk "")
(set @execute-dir
(expandpath ":")
)
;get OS version number
(set osver
(/
(getversion "exec.library"
(resident)
)
65536
)
)
;set ks20 variable to 1 if running 2.0 or above
(set ks20
(> osver 36)
)
;Check to see whether the user has a c:CDMount. If so, set "prefix"
;to "CD".
(if
(exists "c:CDMount")
(set prefix "CD")
)
(while 1
(
;Attempt to determine what the default menu options should be
(set defmenu 0)
(if
(not
(exists "l:CrossDOSFileSystem")
)
(set defmenu
(bitor defmenu 9)
)
)
(if
(and
(not
(exists "sys:CrossPC")
)
(exists ":CrossPC")
)
(set defmenu
(bitor defmenu 12)
)
)
;Ask the user what he wants to install or do.
(set mainopt
(askoptions
(prompt "Please select all functions that you wish to perform")
(choices "Install CrossDOS"
"Configure Hard Disk for CrossDOS and CrossPC"
"Install CrossPC"
"Fill out Product Registration"
)
(default defmenu)
(help "The \"Install CrossDOS\" and \"Install CrossPC\" options install the "
"software. The \"Configure Hard Disk\" option will run ConfigDisk, "
"which allows you to set up a drive or partition for CrossPC and "
"CrossDOS. The \"Fill out Product Registration\" option will "
"prompt you for your name and address, and print it to PRT: (the "
"default printer). Using the registration software eliminates "
"the difficulties we sometimes have reading hand-written registration cards."
)
)
)
(if
(= mainopt 0)
(
(message "You didn\'t select anything. Exiting...")
(exit
(quiet)
)
)
)
(if
(in mainopt 0)
(InstallCrossDOS)
)
(if
(in mainopt 1)
(ConfigureHardDisk)
)
(if
(in mainopt 2)
(InstallCrossPC)
)
(if
(in mainopt 3)
(
(Register)
(exit
(quiet)
)
)
(
(exit
(quiet)
)
)
)
)
)